cd target
echo '------------------------------------杀掉上一个进程------------------------------------'
ps aux|grep yitun-server-boot.jar|awk '{print $2}'|xargs kill -9
DATE=$(date +%Y%m%d)
fileName=${DATE}.log
if [ ! -d ../applog/${DATE}/ ];then
mkdir ../applog/${DATE}/
fi
if [ ! -f ../applog/${DATE}/${fileName} ];then
touch ../applog/${DATE}/${fileName}
fi
echo ${fileName}
nohup java -Dfile.encoding=utf-8 -Djava.rmi.server.hostname=106.54.82.86 -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=9092 -Dcom.sun.management.jmxremote.rmi.port=9092 -Dcom.sun.management.jmxremote.authenticate=true -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.password.file=/home/ubuntu/config/java/jre/management/jmxremote.password  -Dcom.sun.management.jmxremote.access.file=/home/ubuntu/config/java/jre/management/jmxremote.access -jar yitun-server-boot.jar --spring.profiles.active=pro > ../applog/${DATE}/${fileName} 2>&1 &
sleep 1
tail -f ../applog/${DATE}/${fileName}
